import { resolve } from 'path'
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
  server: {
    host: '0.0.0.0',
    port: 7587,
    proxy: {
      '/deer': {
        target: 'http://101.43.48.73:39006',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/deer/, '')
      }
    }
  },
  resolve: {
    alias: {
      '@': resolve(__dirname, 'src')
    }
  },
  plugins: [react()]
})
